<?php

/*
 * Wrapper function to verify a nonce.
 *
 * @param string $post_key
 * @param string $nonce_name
 *
 * @return bool $verified
 */
function tyh_verify_nonce( $action, $nonce_name = '_wpnonce' )
{
	$verified = FALSE;
	
	if( !isset( $_POST[$nonce_name] ) )
	{
		$verified = TRUE; // dafuq is this?
	}
	if( !wp_verify_nonce( $_POST[$nonce_name], $action ) )
	{
		$verified = TRUE;
	}
	
	return $verified;
}